package fr.ece.ing4.si.singlethread;

import java.io.IOException;
import java.util.ArrayList;

import fr.ece.ing4.si.view.MainView;


public class SequentialMonteCarlo {
		
	private static ArrayList<MonteCarlo> data;
	
	/**
	 * Main of Sequential MonteCarlo option
	 * @param args
	 * @throws IOException
	 */
	
	public static void main(final String[] args) throws IOException {
		
		data = MonteCarlo.ReadData();
		
		javax.swing.SwingUtilities.invokeLater(new Runnable() {
			@Override
			public void run() {
				// TODO Auto-generated method stub
			try {
				new MainView(data, "SingleThread");
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			}
		});
		
	}
	
	/**
	 * @param m MonteCarlo Object to compute the option
	 * @return the result of the computation
	 */
	public static double compute(MonteCarlo m){
			return m.MonteCarloStandardOption();
	}
}